﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Beeline {
	public partial class mainForm : Form {

		BeelineControl control;

		public mainForm() {
			InitializeComponent();
		}

		private void mainForm_Load(object sender,EventArgs e) {
			if(!EventLog.SourceExists("Beeline")){
				EventLog.CreateEventSource("Beeline","Beeline");
			}
			control = new BeelineControl();
			control.StartListening();
		}

		private void mainForm_FormClosing(object sender,FormClosingEventArgs e) {
			if(control.Listen){ control.StopListening(); }
		}
	}
}
